<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <!--<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no"/>-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="web description is me">
    <meta name="author" content="wangqinmin">
    <link rel="icon" href="../img/icon/B.ico">
    <title>22_bootstrap折叠效果</title>
    <link rel="stylesheet" href="../bootstrap-3.3.7/css/bootstrap.css"/>
    <!--<link rel="stylesheet" href="../bootstrap-3.3.7/css/bootstrap-theme.css"/>-->
    <link href="../css/ie10-viewport-bug-workaround.css" rel="stylesheet">
    <!--<link href="../css/starter-template.css" rel="stylesheet">-->
    <script type="text/javascript" src="../jquery-3.3.1/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="../bootstrap-3.3.7/js/bootstrap.js"></script>
    <script type="text/javascript">

    </script>
</head>
<body>

<!-- container：作用相当于一个自动居中的容器(用的地方很多，不然样式可能难看) -->
<div class="container">
    <div class="row" style="margin: 100px">
        <h1>折叠、后台功能菜单经常用</h1>
        <h3> data-toggle="collapse"：表示点击这个按钮有效果</h3>
        <h3> href="#collapseExample"：表示链接到的位置</h3>
        <h3> class="collapse"：这个属性表示默认隐藏</h3>
        <h5>当点击按钮的时候，找到#collapseExample对应的id,显示或隐藏</h5>
        <a class="btn btn-info" role="button" data-toggle="collapse" href="#collapseExample" aria-expanded="false"
           aria-controls="collapseExample">
            折叠显示 使用href属性
        </a>
        <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample1"
                aria-expanded="false" aria-controls="collapseExample">
            折叠显示 使用data-target属性
        </button>
        <div class="collapse" id="collapseExample">
            <div class="well">
                可折叠桃的好处?<br/>
                　　①桃子有补心、生津、解渴、消积、润肠、解劳热的功效<br/>
                　　②桃仁有润燥滑肠、去淤血、镇咳之功<br/>
                　　③桃叶有杀虫之功效<br/>
            </div>
        </div>
        in 属性：表示默认显示
        <div class="collapse in" id="collapseExample1">
            <div class="well">
                可折叠桃的好处?<br/>
                　桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子<br/>
                　桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子<br/>
                　桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子桃子<br/>
            </div>
        </div>
    </div>

    <div style="width: 50px;height: 50px"></div>

    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingOne">
                <h4 class="panel-title">
                    <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"
                       aria-expanded="true" aria-controls="collapseOne">
                        可折叠 #1 class 的 in属性：表示默认显示
                    </a>
                </h4>
            </div>
            <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                <div class="panel-body">
                    可折叠桃的好处?<br/>
                    　　①桃子有补心、生津、解渴、消积、润肠、解劳热的功效<br/>
                    　　②桃仁有润燥滑肠、去淤血、镇咳之功<br/>
                    　　③桃叶有杀虫之功效<br/>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingTwo">
                <h4 class="panel-title">
                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                       href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                        可折叠 #2
                    </a>
                </h4>
            </div>
            <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                <div class="panel-body">
                    可折叠桃的好处?<br/>
                    　　①桃子有补心、生津、解渴、消积、润肠、解劳热的功效<br/>
                    　　②桃仁有润燥滑肠、去淤血、镇咳之功<br/>
                    　　③桃叶有杀虫之功效<br/>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingThree">
                <h4 class="panel-title">
                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                       href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                        可折叠 #3
                    </a>
                </h4>
            </div>
            <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
                <div class="panel-body">
                    可折叠桃的好处?<br/>
                    　　①桃子有补心、生津、解渴、消积、润肠、解劳热的功效<br/>
                    　　②桃仁有润燥滑肠、去淤血、镇咳之功<br/>
                    　　③桃叶有杀虫之功效<br/>
                </div>
            </div>
        </div>
    </div>


    <div style="width: 50px;height: 50px"></div>

    <div class="row">
        <!-- 最外层 -->
        <div class="panel-group" id="panelcontainer">
            <!-- 功能菜单1 -->
            data-parent="#panelcontainer": 打开栏目1，关闭其他/关闭栏目1，打开其他
            <div class="panel panel-danger">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a href="#" data-toggle="collapse" data-target="#demo1" data-parent="#panelcontainer">栏目管理1</a>
                    </h4>
                </div>
                <div class="collapse panel-collapse" id="demo1">
                    <div class="panel-body">
                        <ul>
                            <li><a href="#">增加栏目1</a></li>
                            <li><a href="#">增加栏目2</a></li>
                            <li><a href="#">增加栏目3</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- 功能菜单2 -->
            <div class="panel panel-danger">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a href="#" data-toggle="collapse" data-target="#demo2">栏目管理2</a>
                    </h4>
                </div>
                <div class="collapse panel-collapse" id="demo2">
                    <div class="panel-body">
                        <ul>
                            <li><a href="#">增加栏目1</a></li>
                            <li><a href="#">增加栏目2</a></li>
                            <li><a href="#">增加栏目3</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- 功能菜单3 -->
            <div class="panel panel-danger">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a href="#" data-toggle="collapse" data-target="#demo3">栏目管理3</a>
                    </h4>
                </div>
                <div class="collapse panel-collapse" id="demo3">
                    <div class="panel-body">
                        <ul>
                            <li><a href="#">增加栏目1</a></li>
                            <li><a href="#">增加栏目2</a></li>
                            <li><a href="#">增加栏目3</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <h1>折叠效果的事件，参考文档</h1>
    <div style="width: 50px;height: 50px"></div>
    <div style="width: 50px;height: 50px"></div>
    <div style="width: 50px;height: 50px"></div>


</div>
</body>
</html>